<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>IT服务知识库</title>
		<!--公用样式-->
		<link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css" />
		<!--页面样式-->
		<link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/it/common/css/style.css" />
		<!--Layui-->
		<link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
		<style>
			.Right {
				width: 99%;
			}
			.laytable-cell-checkbox{
				text-align: center;
			}
			.layui-table-page {
				text-align: center;
			}
			.layui-border-box{
				border: none;
			}
			.layui-table-page {
				border: none;
			}
			.layui-btn{
				height: 25px;
				line-height: 24px;
			}
			.file_name_span {
				cursor: pointer;
			}
			Body {
				scrollbar-arrow-color: greenyellow;
				scrollbar-face-color: greenyellow;
				scrollbar-3dlight-color: greenyellow;
				scrollbar-highlight-color: greenyellow;
				scrollbar-shadow-color: greenyellow;
				scrollbar-darkshadow-color: greenyellow;
				scrollbar-track-color: greenyellow;
			}
		</style>
	</head>
	<body scroll="no">
		<!--容器-->
		<div class="container clearfix" style="margin-left:3%;width:97%;">
			<!--右侧内容-->
			<div class="Right fr mt50">
				<div class="itTop whitebg">
					<@shiro.hasPermission name ="it:newFolder">
						<button type="button" class="redbg white" onclick="_itkl.file.newDic('${dicId}')">新建文件夹</button>
					</@shiro.hasPermission>
					<@shiro.hasPermission name ="it:uploading">
						<#if '${fileIsForm}' == '1'>
							<!-- 当前文件夹就是表单 -->
							<button class="bluebg white ml10" formcode="${formTypeCode}" onclick="_itkl.form.showForm(this,'1','${dicId}')">添加</button>
						</#if>
						<#if ('${fileIsForm}' == '2' && '${thisDic.linkId}' != '')>
							<!-- 父级文件夹(不一定父级几级)是表单 显示编辑表单-->
							<button class="bluebg white ml10" formcode="${formTypeCode}" onclick="_itkl.form.showEdit('${dicId}')" formcenterid="${formCenterFileId}">编辑表单</button>
						</#if>
						<#if '${fileIsForm}' == '3'>
							<!-- 普通文件夹显示上传文件-->
							<button class="bluebg white ml10" onclick="_itkl.file.showUpload('${dicId}')">上传文件</button>
						</#if>

					</@shiro.hasPermission>

					<#if  '${onlyzskuser}'!=1 >
						<#if ("${fileAboutProject}"!="" && "${fileAboutProject}"=="2")>
							<#if "${projectDicCanDown}"=="1">
								<button class="greenbg white ml10" onclick="_itkl.file.muldown('${dicId}')">批量下载</button>
							</#if>
						<#else>
							<#if "${qx}"=="1">
								<button class="greenbg white ml10" onclick="_itkl.file.muldown('${dicId}')">批量下载</button>
							</#if>
						</#if>

					</#if>
					<@shiro.hasPermission name ="it:delete">
						<button class="redbg white ml10" onclick="_itkl.file.recycle('${dicId}')">文件回收站</button>
					</@shiro.hasPermission>
						<input id="search-input" class="layui-input layui-input-inline w25p" type="text" placeholder="文件名称" style="width: 25%!important;margin-left:3%">
					<button class="bluebg white" onclick="searchByName(this)">查找</button>
				</div>
				<div class="itList whitebg" style="min-height:500px;padding-bottom: 20px">
					<table id="fileList" lay-filter="fileList" style="padding-bottom: 20px"></table>
				</div>
			</div>
		</div>
		<!--JQ-->
		<script type="text/javascript" charset="utf-8" src="/plugin/common/js/jquery-1.8.3.min.js"></script>
		<!--公用样式JS-->
		<script type="text/javascript" charset="utf-8" src="/plugin/common/js/comment.js"></script>
		<!--选择城市js-->
		<script type="text/javascript" charset="utf-8" src="/plugin/common/js/area.js"></script>
		<script type="text/javascript" charset="utf-8" src="/plugin/common/js/select.js"></script>
		<!--进度条-->
		<script type="text/javascript" charset="utf-8" src="/plugin/common/js/progress.js"></script>
		<!--分页-->
		<script type="text/javascript" charset="utf-8" src="/plugin/common/js/jquery.page.js"></script>
		<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"></script>
		<script type="text/html" id="toolBar">
			{{# if(d.zskfileType == '2'){ }}

			<#if ("${fileAboutProject}"!="" && "${fileAboutProject}"=="2")>
				<#if "${projectDicCanDown}"=="1">
					<a class="layui-btn layui-btn-primary" lay-event="download">下载</a>
				</#if>
			<#else>
				<#if "${qx}"=="1">
					<a class="layui-btn layui-btn-primary" lay-event="download">下载</a>
				</#if>
			</#if>
			<#if    "${onlyzskuser}"!="1"    >
				{{# if(d.linkId == null || d.linkId == ''){ }}

				{{# }else{ }}
					<@shiro.hasPermission name ="it:redact">
						<#if (('${fileIsForm}' == '1' || '${fileIsForm}' == '2'))>
							<a class="layui-btn layui-btn-primary" formcenterid="${formCenterFileId}" formcode="${formTypeCode}" lay-event="editForm">编辑表单</a>
						</#if>
					</@shiro.hasPermission>
				{{# } }}
				<@shiro.hasPermission name ="it:move">
				<a class="layui-btn layui-btn-primary" lay-event="move">移动</a>
				</@shiro.hasPermission>
				<@shiro.hasPermission name ="it:delete">
				<a class="layui-btn layui-btn-primary" lay-event="del">删除</a>
				</@shiro.hasPermission>
				<@shiro.hasPermission name ="it:searching">
				<a class="layui-btn layui-btn-primary" lay-event="setJS">检索设置</a>
				</@shiro.hasPermission>
			</#if>
			{{# }else if(d.zskfileType == '1'){ }}
			    <#if    "${onlyzskuser}"!="1"  >
						{{# if(d.linkId == null || d.linkId == ''){ }}

						{{# }else{ }}
							<@shiro.hasPermission name ="it:redact">
								<#if (('${fileIsForm}' == '1' || '${fileIsForm}' == '2'))>

									<a class="layui-btn layui-btn-primary" formcenterid="${formCenterFileId}" formcode="${formTypeCode}" lay-event="editForm">表单数据</a>

								</#if>
							</@shiro.hasPermission>
						{{# } }}
					<@shiro.hasPermission name ="it:move">
						<a class="layui-btn layui-btn-primary" lay-event="move">移动</a>
					</@shiro.hasPermission>
					<@shiro.hasPermission name ="it:delete">
						<a class="layui-btn layui-btn-primary" lay-event="del">删除</a>
					</@shiro.hasPermission>
					<@shiro.hasPermission name ="it:permission">
						<a class="layui-btn layui-btn-primary" lay-event="setQX">权限设置</a>
					</@shiro.hasPermission>

			    </#if>

			{{# }else{ }}

			{{# } }}
		</script>
		<script type="text/html" id="nameTpl">
			<span <#if '${details}'=='1'>onclick="_itkl.content.jumpTo('{{d.id}}','{{d.zskfileType}}','{{d.fileName}}')"</#if> class="file_name_span">{{ d.fileName }}</span>
		</script>
<#--		<script type="text/javascript" charset="utf-8" src="/plugin/common/js/tabs.js"></script>-->
		<script type="text/javascript"  charset="utf-8" src="/plugin/it/common/js/itkl.js"></script>

		<script>
			$(function(){
				$(document).parents('iframe').attr('scrolling','no');
				var dicId = '${dicId}';
				var formcenterId = '${formCenterFileId}';
				_itkl.content.setFileListTable(dicId,'${onlyzskuser}');
			})
			function flushTable(){
				_itkl.content.flushTable('fileList');
			}
			function searchByName(e){
				var searchKey = $('#search-input').val();
				if(searchKey){
					_itkl.content.flushTableWithSearchKey('fileList',searchKey);
				}else{
					_itkl.content.flushTableWithoutSearchKey('fileList');
				}
			}
		</script>
	</body>

</html>
